package decorator.bookexam2;

public class Whip extends CondimentDecorator{
	Beverage beverage;
	public Whip(Beverage beverage){
		this.beverage = beverage;
	}
	public String getSize(){
		return beverage.size;
	}
	
	public double cost(){
		//return .2 + beverage.cost();
		double cost = beverage.cost();//초기값
		System.out.print(getSize());
		if(getSize().equals(Beverage.TALL)){
			cost += .10;
		}if(getSize().equals(Beverage.VENTI)){
			cost += .5;
		}
		return cost;
		
		
	}
	@Override
	public String getDescription() {
		// TODO Auto-generated method stub
		return beverage.getDescription() + "휘핑크림";
	}
	

}
